const path = require('path');
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  outputDir: 'dist',
  assetsDir: 'assets',
  devServer: {
    https: true,
    open: true,
    proxy: {
      '/api': {
        target: 'https://juqi-server-dev-26219-6-1316521626.sh.run.tcloudbase.com',
        changeOrigin: true,
        ws: true,
        secure: false,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    },
  },
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('@c', resolve('src/components'))
  }
}